home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / biz / demo / mrback_b_demo114.lha / ARexx_Scripts / datetest.mrbk < prev    next >
Text File  |  1991-01-12  |  977b  |  57 lines

  1. /* datetest.mrbk */
  2.  
  3. /* This ARexx script invokes MRBackup's date requester. */
  4.  
  5. signal on ERROR
  6. signal on BREAK_C
  7.  
  8. parse source type res called resolved ext host
  9.  
  10. options results
  11.  
  12. if ~(Show('P', 'MRBackup_#1')) then do
  13.     say "You must run MRBackup first. With a little work, you could"
  14.     say "get this ARexx script to do it for you."
  15.     exit 1
  16. end
  17.  
  18. address "MRBackup_#1"
  19.  
  20. poptofront
  21.  
  22. gettestdate
  23. if rc ~= 0 then do
  24.     say "Failed to get test date; rc = " || rc
  25.     exit rc
  26. end
  27.  
  28. say "Current test date: " || result
  29.  
  30. settestdate
  31. if rc ~= 0 then do
  32.     say "Failed to set test date; rc = " || rc
  33.     exit rc
  34. end
  35.  
  36. say "  Final test date: " || result
  37.  
  38. exit 0
  39.  
  40.  
  41. /*------------------------------------------------------------------*/
  42.  
  43. break_c:
  44.  
  45. say "*** Control-C recieved.  Stopped by user. ***"
  46. exit 5
  47.  
  48. /*------------------------------------------------------------------*/
  49.  
  50. error:
  51.  
  52. say "Error"
  53. exit 6
  54.  
  55. /*------------------------------------------------------------------*/
  56.  
  57.